<?php


namespace app\admin\validate;


use think\Validate;

class ServiceDepositValidate extends Validate
{
    protected $rule = [
        'buyer_name'=>'require',
        'buyer_phone'=>['require', 'regex' => '/^1(3|4|5|6|7|8|9)[0-9]\d{8}$/'],
        'cart_num'=>'require',
        'cart_address'=>'require',
        'file_cart'=>'require',
        'receptionist'=>'require',
        'url_file_original'=>'require',
        'move_time'=>'require',
    ];
    protected $message = [
        'buyer_name.require'=>'请填写办理人',
        'buyer_phone.require'=>'请填写办理人手机号',
        'buyer_phone.regex'=>'手机号格式不正确   ',
        'cart_num.require'=>'请填写证件号码',
        'cart_address.require'=>'请填写联系地址',
        'file_cart.require'=>'请上传证件上传',
        'receptionist.require'=>'请填写与逝者关系',
        'move_time.require'=>'请选择预约寄出时间',
    ];
    // 验证场景
    protected $scene = [
        'edit_jc' => 'buyer_name,buyer_phone,cart_num,cart_address,url_file_original,move_time',
        'renewal' => 'buyer_name,buyer_phone,cart_num,cart_address,receptionist',
    ];

}